from base.base_filters import BaseFilter


class MessageFilter(BaseFilter):

    @staticmethod
    def filter_qq(queryset, value):
        return queryset.filter(qq__icontains=value)

    @staticmethod
    def filter_nickname(queryset, value):
        return queryset.filter(nickname__icontains=value)

    @staticmethod
    def filter_content(queryset, value):
        return queryset.filter(content__icontains=value)

    @staticmethod
    def filter_browser(queryset, value):
        return queryset.filter(browser=value)

    @staticmethod
    def filter_system(queryset, value):
        return queryset.filter(system=value)
